﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using HeresyManager;

public partial class Member_RaiseCharacter : System.Web.UI.Page
{

    public Character Character { get; set; }

    protected override void OnInit(EventArgs e)
    {
        base.OnInit(e);
        Character = UserData.CurrentCharacter;
    }

    protected void Page_Load(object sender, EventArgs e)
    {
        this.Visible = true;
     
   
    }
    protected override void OnPreRender(EventArgs e)
    {
        base.OnPreRender(e);
        if (Character != null)
            AvailableExp.Text = "Available Exp " +Character.AvailableExp.ToString();
    }

    protected void AddExperenceButton_Click(object sender, EventArgs e)
    {
        int exp;
        if (!int.TryParse(this.ExpTextBox.Text, out exp))
            return;

        if (Character != null)
            Character.AddExp(exp);
    }
}